#ifndef TEXTCONTENTHANDLER_H_
#define TEXTCONTENTHANDLER_H_

#include "xmlcontenthandler.h"
#include "TextBlock.h"
#include "RPointerStack.h"
#include "LinkTemplate.h"

class CTextContentHandler : public CBase,public XmlContentHandler
{
public:
	CTextContentHandler(LinkTemplate* aLink);
	virtual ~CTextContentHandler();
	
public:
	void OnStartElementL( const RTagInfo &aElement,const RAttributeArray &aAttributes, TInt aErrorCode );
	void OnEndElementL( const RTagInfo &aElement, TInt aErrorCode );
	void OnContentL( const TDesC8 &aBytes, TInt aErrorCode );

	
public:
	static CTextContentHandler* NewLC(LinkTemplate* aLink);
	static CTextContentHandler* NewL(LinkTemplate* aLink);

public:
	RPointerStack<TextStyle> iTextStyleStack;
	LinkTemplate* iTextBlockTemplate;
public:
	void ParseXmlL(const TDesC& aDes);
};

#endif /*TEXTCONTENTHANDLER_H_*/
